<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue学习elementUI</title>
    <!--引入vue -->
    <script type="application/javascript" src="../js/vue.js"></script>
    <!-- -->
    <script type="application/javascript" src="../js/index.js"></script>
    <!--引入CSs -->
    <link rel="stylesheet" href="../css/index.css">



</head>
<body>

<div id="app">
    <div style="width: 500px;margin: 100px auto">
        <el-form :model="formData" class="demo-form-inline"  label-width="80px">

            <el-form-item label="账号">
                <el-input v-model="formData.name" placeholder="输入账号"></el-input>
            </el-form-item>

            <el-form-item label="密码">
                <el-input v-model="formData.password" placeholder="输入密码"></el-input>
            </el-form-item>

            <el-form-item>
                <el-button type="primary" @click="onSubmit">登录</el-button>
            </el-form-item>

        </el-form>
    </div>

</div>
<script>
    //创建Vue实例
    let app = new Vue({
        //挂载点
        el:"#app",
        data(){
            return{
                formData: {
                    user: '',
                    region: ''
                }
            }
        },
        methods:{
            fun01(){

            },
            onSubmit() {
                console.log('submit!');
                console.log(this.formData);
            }
        },
    })
</script>
</body>
</html>